Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Time Base Functions / Working With Times


ConvertTime

You can convert a time you obtain from one time base into a time that is relative to another time base by calling the ConvertTime function. Both time bases must rely on the same time source. You must specify the time to be converted in a time structure.

pascal void ConvertTime (TimeRecord *inout, TimeBase newBase);
inout
Contains a pointer to a time structure that contains the time value to be converted. The ConvertTime function replaces the contents of this time structure with the time value relative to the specified time base.
newBase
Specifies the time base for this operation. Your application obtains this time base identifier from the NewTimeBase function (described on page 2-297).
DESCRIPTION
The ConvertTime function includes the rate associated with each time value in the conversion; therefore, you should use this function when you want to convert time values. Use the ConvertTimeScale function (described in the next section) to convert durations.

ERROR CODES
None


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996